{template common/header}
{template user/userheader}
<div class="container mt20">
	<div class="span12 main">
		{template user/usernav}
		<div class="messages">
			<h4 class="mt10 text_c">
			{lang tip_edit_group}
			</h4>
         <form id="update_group_form" action="{url home/updategroup}" class="form-horizontal mt10" method="post">
         	<fieldset>
         		<input type="hidden" name="submit" value="true"/>
         		<input type="hidden" name="groupid" value="$group['group_id']"/>
         		<input type="hidden" name="bannerchanged" id="bannerchanged" value="no"/>
					<div class="control-group">
			            <label class="control-label">{lang label_image_settings}</label>
			            <div class="controls" id="cropbannerimg">
         					<input type="hidden" name="cover"/>
							<button type="button" class="btn" data-action="openBanner" data-params="group,$group['group_id']">{lang label_set_banner}</button>
							<img class="image-bg" src="{echo groupbanner($group['group_id'])}" id="banner_group_{$group['group_id']}" height="30">
							<p class="help-block">{lang tip_open_new_win}</p>
			            </div>
			        </div>
					<div class="control-group">
			            <label class="control-label" for="group_title">{lang group_title}</label>
			            <div class="controls">
			                <input id="group_title" type="text" name="group_title" value="{$group['group_title']}"/>
			            </div>
			        </div>
			        <div class="control-group">
			            <label class="control-label" for="category_id">{lang category}</label>
			            <div class="controls">
			            	<select id="category_id" name="category_id" class="span3">
			            	{loop $rootCategories $category}
			            		<option value="{$category['category_id']}" {if $category['category_id']==$topic['category_id']}selected{/if}>{$category['category_name_cn']}</option>
			            	{/loop}
			            	</select>
			            </div>
			        </div>
					<div class="control-group">
			            <label class="control-label" for="group_desc">{lang group_desc}</label>
			            <div class="controls">
			            	<textarea id="group_desc" name="group_desc" rows="6" class="span4">{$group['group_desc']}</textarea>
			            </div>
			        </div>
			        
					<div class="control-group">
			            <label class="control-label" for="keyword">{lang tag}</label>
			            <div class="controls">
			            	<input id="keyword" type="text" name="keyword" value="{$group['keyword']}"/>
							<p class="help-block">{lang tag_tip}</p>
			            </div>
			        </div>
			        <div class="control-group">
			        	<label class="control-label"></label>
			            <div class="controls">
			            <button type="submit" class="btn btn-primary submit-btn" data-loading-text="{lang tip_loading}">{lang save}</button>
			            </div>
			        </div>
         	</fieldset>
    	</form>
       </div>
	</div>
</div>
<script>
$(document).ready(function() {
	$.oValidate('update_group_form');
});
</script>
{template common/footer}
